<?php

class MessageModel extends Model {
	function insertmsg($field){
            //do the query
            $insert_string = "'".$field['id_sender']."','".$field['topik']."','".$field['isi']."'";
            $this->query('insert into message (Id_sender,Topik,Isi) values ('.$insert_string.')');
	}

        function insertrcvr($field){
            //do the query
            $insert_string = "'".$field['idmsg']."','".$field['id_receiver']."'";
            $this->query('insert into msg_receiver (Idmsg,Id_receiver) values ('.$insert_string.')');
	}
}
